<?php
class Poll_Widget_FeatureQuestionsController extends Engine_Content_Widget_Abstract
{ 
    public function indexAction() {
        $this->view->viewer = $viewer = Engine_Api::_()->user()->getViewer();
        $params['privacy'] = 'all';
        $params['viewer'] = $viewer->getIdentity();
        $params['order'] = 'RAND()';
        $params['feature'] = 1;
        $this->view->paginator = $paginator = Engine_Api::_()->poll()->pollPaginator($params);
        $paginator->setItemCountPerPage($this->_getParam('limit', 5));
        if (!count($paginator)) return $this->setNoRender(true);
    }
}
